package generics.and.colecctions.ordenacion.comparator;

import java.util.Comparator;

public class ClaseImplementaComparatorApellido implements Comparator<ClaseBase> {

	@Override
	public int compare(ClaseBase o1, ClaseBase o2) {

		if (o1 != null && o2 != null) {
			return o1.getApellido().compareTo(o2.getApellido());
		}
		return 0;
	}

}
